<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="x-ua-compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>BootStrap栅格示例</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style>
        #r1 div {
            background-color: red;
            border: 1px solid black;
        }

        #r2 div {
            background-color: green;
            border: 1px solid black;
        }
    </style>
</head>
<body>
<div class="container">
    <div id="r1" class="row">
        <div class="col-md-6 col-xs-4 col-xs-offset-2">col-md-6</div>
        <div class="col-md-6 col-xs-4 col-xs-offset-2">col-md-6</div>
    </div>
    <!-- first row end -->
    <div id="r2" class="row">
        <div class="col-md-2 col-xs-6">col-md-2|col-xs-6</div>
        <div class="col-md-2 col-xs-6">col-md-2|col-xs-6</div>
        <div class="col-md-2 col-xs-4">col-md-2|col-xs-4</div>
        <div class="col-md-2 col-xs-4">col-md-2|col-xs-4</div>
        <div class="col-md-2 col-xs-4">col-md-2|col-xs-4</div>
        <div class="col-md-2 col-xs-12">
            <div class="row">
                <div class="col-md-3 col-xs-6">col-md-3</div>
                <div class="col-md-3 col-xs-6">col-md-3</div>
                <div class="col-md-3 col-xs-12">col-md-3</div>
                <div class="col-md-3 col-xs-12">col-md-3</div>
            </div>
        </div>
    </div>
    <!-- second row end -->
</div>
<!-- container end -->
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>